package com.design_patterns.strategy;

/**
 * @author: 李德才
 * @description:
 * @create: 2020-08-23 17:37
 **/
public class SayColor<T> {
    /**
     * 里氏替换原则,父类出现的地方子类可以出现
     *
     * @param color
     */

    public void sayColor(Color  color) {
        color.sayColor();
    }

    public void sayColor(T color, ColorFunction<T> colorFunction) {
        colorFunction.say(color);
    }

}
